//
//  Ugc_HomePage_VC_V3.m
//  ZITHER
//
//  Created by weixin on 2018/10/23.
//  Copyright © 2018年 weixn. All rights reserved.
//

#import "Ugc_HomePage_VC_V3.h"

@interface Ugc_HomePage_VC_V3 ()

//@property (nonatomic,strong)QMUILabel * leb;

@end

@implementation Ugc_HomePage_VC_V3

- (void)viewDidLoad {
    [super viewDidLoad];
    [self setNav];
    [self setUI];
}

-(void)setUI{
    [self.view addSubview:self.tbv];
    [self.tbv mas_makeConstraints:^(MASConstraintMaker *make) {
        make.top.equalTo(self.view).offset(NaviHeight);
        make.left.equalTo(self.view).offset(0);
        make.right.equalTo(self.view).offset(0);
        make.bottom.mas_equalTo(0);
    }];
}



-(void)setNav{
    /* TODO: ================= 导航栏V4样式 =================*/
    [self.baseNavigationView NavigationBarStyle:1];
    self.baseNavigationView.leftButton1.hidden = YES;
    [self.baseNavigationView setHiddenNav:NO VC:self];

//    self.baseNavigationView.isShowShadow = YES;
    if ([self.userId isEqualToString:kUSER_INFO_MANAGER.userId]) {
        self.baseNavigationView.navViewStyle.title.text = @"我的创作";
    }else{
        self.baseNavigationView.navViewStyle.title.text = self.userName;
    }
}


-(Ugc_HomePage_TbV_V3 *)tbv{
    if (!_tbv) {
        _tbv = [[Ugc_HomePage_TbV_V3 alloc]initializeFrame:CGRectMake(0, 0, 1, 1) isMj:1 isEstimatedRowHeight:YES addRegisterNib:@[@"MainFirst_MagazineList_PGCCell_WX",@"MainFirst_MagazineList_UgcCell_WX"]];
    }
    return _tbv;
}

-(void)setUserId:(NSString *)userId{
    _userId = userId;
    self.tbv.userId = userId;

}

-(void)setUserName:(NSString *)userName{
    _userName = userName;
    self.tbv.userName = userName;
    if ([self.userId isEqualToString:kUSER_INFO_MANAGER.userId]) {
        self.baseNavigationView.navViewStyle.title.text = @"我的创作";
    }else{
        self.baseNavigationView.navViewStyle.title.text = userName;
    }
}

-(void)setUserAvatar:(NSString *)userAvatar{
    _userAvatar = userAvatar;
    self.tbv.userAvatar = userAvatar;
}
-(void)viewWillAppear:(BOOL)animated{
    
    self.tabBarController.tabBar.hidden = YES;
    
}
@end
